<template>
  <div class="basic_information"></div>
</template>

<script>
import {
  GoodsCateList,
  supplierLists,
  addsuppliergoods,
  getLabelList,
  freightgetList,
} from "@/api/supplier/index";
import LogoUpload from "@/components/FileUpload";
export default {
  components: { LogoUpload },
  data() {
    return {};
  },
  mounted() {
    const p1 = new Promise((req, rej) => {
      GoodsCateList().then((res) => {
        if (res.code !== 200 || res.status !== 1) {
          rej();
          return this.$messages.error(res.msg);
        }
        req();
        this.typeData = res.data;
      });
    });
    const p2 = new Promise((req, rej) => {
      supplierLists().then((res) => {
        if (res.code !== 200 || res.status !== 1) {
          rej();
          return this.$messages.error(res.msg);
        }
        req();
        this.options = res.data;
      });
    });
    Promise.all([p2, p1])
      .then(() => {
        this.loading = false;
      })
      .catch(() => {
        this.loading = false;
      });
  },
  methods: {},
  beforeDestroy() {
    this.$refs.basicForm.validate((valid) => {
      if (valid) {
      } else {
        this.$emit("activeNameChange", "basic_information");
      }
    });
    console.log(this.basicForm);
  },
};
</script>

<style>
</style>